package com.atguigu.gmall.cart.client;


import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(name = "service-cart")
public interface CartFeignClient {

    //加入购物车
    @PostMapping("/api/cart/addCart/{skuId}/{skuNum}")
    public CartInfo addCart(@PathVariable Long skuId, @PathVariable Integer skuNum);


    //查询新添加的购物车商品
    @PostMapping("/api/cart/toCart/{skuId}")
    public CartInfo toCart(@PathVariable Long skuId);

    //商品清单
    @GetMapping("/api/cart/getCartListChecked")
    public List<CartInfo> getCartListChecked();








}
